generic
   type Data_Type is private;
   type Key_Type is private;

   with function Get_Key(Item : in Data_Type) return Key_Type is <>;
   with procedure Put(Item : in Data_Type) is <>;

   with function "<"(Left,Right : in Data_Type) return Boolean is <>;
   with function "="(Left,Right : in Data_Type) return Boolean is <>;
   with function ">"(Left,Right : in Data_Type) return Boolean is <>;


package Generic_Sorted_List is
   type List_Type is private;
   type List_Pointer is access all List_Type;


   function Empty(List : in List_Pointer) return Boolean;
   procedure Insert(List : in out List_Pointer; In_Data : in Data_Type);
   procedure Put(List : in List_Pointer);
   function Member(List : in List_Pointer; Key : in Key_Type) return Boolean;
   procedure Remove(List : in out List_Pointer; Key : in Key_Type);
   procedure Delete(List : in out List_Pointer);
   function Find(List : in List_Pointer; Key : in Key_Type) return Data_Type;
   procedure Find(List : in out List_Pointer;
                  Key : in Key_Type;
                  Output : out Data_Type);
   procedure Next(List : in out List_Pointer);
   function Length(List : in List_Pointer) return Integer;
   procedure Copy(Orig : in out List_Pointer; Copy : in out List_Pointer);
   function Copy(Orig : List_Pointer) return List_Pointer;
   function Get_First_Item(List : in List_pointer) return Data_Type;
   Remove_Error : exception;
   Find_Error : exception;

private
     type List_Type is
      record
         Data : Data_Type;
           Next : List_Pointer;
      end record;

end Generic_Sorted_List;

